package com.club.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangfc
 * @date 2022/12/30 10:22
 */
@Data
@Builder(toBuilder = true)
@TableName(value = "t_club_pic")
public class TClubPic implements Serializable {

    private static final Long serialVersionUUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "club_pic_id",type = IdType.AUTO)
    private int clubPicId;

    /**
     * 社团id
     */
    @TableField(value = "club_id")
    private int clubId;


    /**
     * 图片路径
     */
    @TableField(value = "filepath")
    private String filepath;


    /**
     * 是否封面
     */
    @TableField(value = "iscover")
    private String isCover;


    /**
     * 创建日期
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "createtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date crateTime;

    /**
     * 修改日期
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "modifytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}
